﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="check.aspx.cs" Inherits="order_check" %>


<%@ Register src="../UserControls/CFooterControl.ascx" tagname="CFooterControl" tagprefix="uc1" %>
<%@ Register src="../UserControls/CHeaderControl.ascx" tagname="CHeaderControl" tagprefix="uc2" %>

<%@ Register src="../UserControls/blockcard.ascx" tagname="blockcard" tagprefix="uc3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
      <script>
          $(document).ready(function () {
              jQuery("input[name='pd_FrpId']").click(function () {

                  jQuery("input[name='paytype']").attr("checked", false);
              });
              jQuery("input[name='paytype']").click(function () {

                  jQuery("input[name='pd_FrpId']").attr("checked", false);
              });
          })
    </script>
    <uc2:CHeaderControl ID="CHeaderControl1" runat="server" />
    <asp:HiddenField ID="hiorderid" runat="server"  />
    <div id="bdw" class="bdw">
    <%if (ordermodel != null)
      { %>
<div id="bd" class="cf">
<div id="account-charge">
    <div id="deal-buy" class="box">
        
        <div class="box-content">
            <div class="head"><h2>您的订单</h2></div>
            <div class="sect">
                <table class="order-table">
                    <tr>
                 
                        <th class="deal-buy-desc">项目名称</th>
                        <th class="deal-buy-quantity">数量</th>
                        <th class="deal-buy-multi"></th>
                        <th class="deal-buy-price">价格</th>
                        <th class="deal-buy-equal"></th>
                        <th class="deal-buy-total">总价</th>
                    </tr>


                
                    <tr>
                        <td class="deal-buy-desc"><%= GetTeam(ordermodel.Team_id.ToString(),ordermodel.Id)%></td>
                        <td class="deal-buy-quantity"><%=ordermodel.Quantity%></td>
                        <td class="deal-buy-multi">x</td>
                        <td class="deal-buy-price" id="deal-buy-price"><span class="money"><span><%=ordermodel.Price%></td>
                        <td class="deal-buy-equal">=</td>
                        <td class="deal-buy-total" id="deal-buy-total"><span class="money"></span><%= orderbll.Getmoney(double.Parse(ordermodel.Quantity.ToString()), double.Parse(ordermodel.Price.ToString()))%></td>
                    </tr>
                   
				<%if (ordermodel.Express == "Y")
      { %>
					<tr>
						<td class="deal-buy-desc">快递</td>
						<td class="deal-buy-quantity"></td>
						<td class="deal-buy-multi"></td>
						<td class="deal-buy-price"><span class="money"></span><span id="deal-express-price">
                        <% teamodel = teambll.GetModel(ordermodel.Team_id);
                           if (teamodel != null)
                           {
                               %>


                               <%if (teamodel.Farefree == 0)
                                 { %>
                                 <%=ordermodel.Fare%>
                               <% }
                                 else
                                 {%>
                            <%if (ordermodel.Quantity < teamodel.Farefree)
                              { %>
                               
                        <%=ordermodel.Fare%>
                        <% }
                              else
                              {%>
                                 0
                        <% }%>
                        <% }%>
                       
                        <% }%>
                        </span></td>
						<td class="deal-buy-equal">=</td>
						<td class="deal-buy-total"><span class="money"></span><span id="deal-express-total"></td>
					</tr>
                    <% }%>
				
					<%if (ordermodel.Card_id != "")
       { %>
				   <tr id="cardcode-row">
						<td class="deal-buy-desc">代金券：<span id="cardcode-row-n"><%=ordermodel.Card_id%></span></td>
						<td class="deal-buy-quantity"></td>
						<td class="deal-buy-multi"></td>

						<td class="deal-buy-price"><span class="money"></span></td>
						<td class="deal-buy-equal">=</td>
						<td class="deal-buy-total">-<span class="money">¥</span><span id="cardcode-row-t"><%=ordermodel.Card%></span></td>
					</tr>
                    <% }%>
                   

				

					<tr class="order-total">
                        <td class="deal-buy-desc"><strong>应付总额：</strong></td>
                        <td class="deal-buy-quantity"></td>
                        <td class="deal-buy-multi"></td>
                        <td class="deal-buy-price"></td>
                        <td class="deal-buy-equal">=</td>
                        <td class="deal-buy-total"><span class="money"></span>
                        
                        <%=ordermodel.Origin %>     
                        </td>
                    </tr>
                    
                </table>
				<div class="paytype">
                  <%if (ordermodel.State == "unpay")
                    {%>
                </div>
              
				<div class="order-check-form ">
					<div class="order-pay-credit">
						<h3>您的余额</h3>
						<p>账户余额：<strong><span class="money"></span><%=userbll.GetUsermoney(ordermodel.User_id.ToString())%></strong>
                        <%if (userbll.GetUsermoney(ordermodel.User_id.ToString()) < ordermodel.Origin)
                          { %>
                         ,您的余额不够完成本次付款，还需支付 <strong><span class="money"></span><%=orderbll.Getyumoney(userbll.GetUsermoney(ordermodel.User_id.ToString()), ordermodel.Origin)%> </strong>。
                         请选择支付方式：
                        <%}
                          else
                          {%>
                         ，您的余额足够本次购买，请直接确认订单，完成付款。</p>
                         <% }%>
						<div class="other_pay"></div>
					</div>  
                     
			  <%if (userbll.GetUsermoney(ordermodel.User_id.ToString()) < ordermodel.Origin)
       { %>
					<ul class="typelist">
                    
                    <%if (sysmodel != null)
                      { %>
                  

                        
                          <%if (sysmodel.yeepaymid != "")
                      { 
                     
                          %>
                            <div class="bank_way">
                        <div class="bank_buy">
                                               <p class="choose-pay-type">易宝支付</p></div>
                    <%-- <label for="check-yeepay" >易宝银行网关</label>--%>
                    <li>
                         <table class="banktable" id="order-check-banktable">
 <tr>
 <td>

 <input type="radio" name="pd_FrpId" id="abc" title="招商银行" value="CMBCHINA-NET">
  <label class="CMBCHINA-NET" title="招商银行"></label></td>
 <td><input type="radio" name="pd_FrpId"   title="工商银行" value="ICBC-NET"><label title="工商银行" class="ICBC-NET"></label></td>
 <td><input type="radio" name="pd_FrpId" title="建设银行" value="CCB-NET"><label class="CCB-NET" title="建设银行"></label></td>
 </tr>
 
 <tr>
 <td><input type="radio" name="pd_FrpId" title="中国农业银行" value="ABC-NET"><label class="ABC-NET" title="中国农业银行"></label></td>
 <td><input type="radio" name="pd_FrpId" title="北京银行" value="BCCB-NET"><label class="BCCB-NET" title="北京银行"></label></td>
 <td><input type="radio" name="pd_FrpId" title="交通银行" value="BOCO-NET"><label class="BOCO-NET" title="交通银行"></label></td></tr>
 
 <tr><td><input type="radio" name="pd_FrpId" title="兴业银行" value="CIB-NET"><label class="CIB-NET" title="兴业银行"></label></td>
 <td><input type="radio" name="pd_FrpId" title="南京银行" value="NJCB-NET"><label class="NJCB-NET" title="南京银行"></label></td>
 <td><input type="radio" name="pd_FrpId" title="中国民生银行" value="CMBC-NET"><label class="CMBC-NET" title="中国民生银行"></label></td></tr>
 
 <tr><td><input type="radio" name="pd_FrpId" title="光大银行" value="CEB-NET"><label class="CEB-NET" title="光大银行"></label></td>
 <td><input type="radio" name="pd_FrpId" title="中国银行" value="BOC-NET"><label class="BOC-NET" title="中国银行"></label></td>
 <td><input type="radio" name="pd_FrpId" title="平安银行" value="PAB-NET"><label class="PAB-NET" title="平安银行"></label></td></tr>
 
 <tr><td><input type="radio" name="pd_FrpId" title="渤海银行" value="CBHB-NET"><label class="CBHB-NET" title="渤海银行"></label></td>
 <td><input type="radio" name="pd_FrpId" value="HKBEA-NET" title="东亚银行"><label class="HKBEA-NET" title="东亚银行"></label></td>
 <td><input type="radio" name="pd_FrpId" title="宁波银行" value="NBCB-NET"><label class="NBCB-NET" title="宁波银行"></label></td></tr>
 
 <tr><td><input type="radio" name="pd_FrpId" title="中信银行" value="ECITIC-NET"><label class="ECITIC-NET" title="中信银行"></label></td>
 <td><input type="radio" name="pd_FrpId" title="深圳发展银行" value="SDB-NET"><label class="SDB-NET" title="深圳发展银行"></label></td>
  <td><input type="radio" name="pd_FrpId" title="广东发展银行" value="GDB-NET"><label class="GDB-NET" title="广东发展银行"></label></td></tr>
  
 <tr><td><input type="radio" name="pd_FrpId" title="上海浦东发展银行" value="SPDB-NET"><label  class="SPDB-NET" title="上海浦东发展银行"></label></td>
 <td><input type="radio" name="pd_FrpId" value="POST-NET" title="中国邮政"><label class="POST-NET" title="中国邮政"></label></td>
 <td><input type="radio" name="pd_FrpId" title="北京农村商业银行" value="BJRCB-NET"><label class="BJRCB-NET" title="北京农村商业银行"></label></td></tr>
 </table>

                     </li>
			        </div>


           <% }%>             
                    
             
                 

        		
                        <%if (sysmodel.alipaymid != "")
                      { %>
                       <div class="bank_way">
                        <div class="bank_buy">
                                               <p class="choose-pay-type">支付宝支付</p></div>
						<li><input id="check-alipay" type="radio" name="paytype" value="alipay"  /><label for="check-alipay" class="biglabel alipay">支付宝交易，推荐淘宝用户使用</label>
                        <br />
                             <br />
                        </li>
		</div>
                  <% }%>   

                <%if (sysmodel.tenpaymid != "")

                      { %>
                         <div class="bank_way">
                        <div class="bank_buy">
                                               <p class="choose-pay-type">财付通支付</p></div>
						<li><input id="check-tenpay" type="radio" name="paytype" value="tenpay" {$ordercheck['tenpay']} /><label for="check-tenpay" class="biglabel tenpay">财付通交易，推荐拍拍用户使用</label></li>
                        </div>
				
                    <%}
                        if (sysmodel.chinabankmid != "")
                        { %>
                          <div class="bank_way">
                        <div class="bank_buy">
                                               <p class="choose-pay-type">网银支付</p></div>
                        <li><input id="Radio2" type="radio" name="paytype" value="chinabank" {$ordercheck['chinabank']} /><label for="check-tenpay" class="biglabel chinabank">网银支付交易，支持招商、工行、建行、中行等主流银行</label></li>
                        </div>
                          <%} %>

                
                   <%if (_system != null)
                     {
                         if (_system["chinamobilepay_id"] != "" && _system["chinamobilepay_id"]!=null)
                         {
                          %>
                            <div class="bank_way">
                        <div class="bank_buy">
                                               <p class="choose-pay-type">移动支付</p></div>
                          	<li><input id="Radio1" type="radio" name="paytype" value="chinamobilepay" {$ordercheck['tenpay']} /><img src="<%=ImagePath()%>chinamobile.jpg" />移动支付交易，推荐移动用户使用</li>
                            </div>

                   <% }
                     }%>

					</ul>


                <% }%>

                <% }%>
			
					<div class="clear"></div>
					<p class="check-act">
					<input type="submit" value="确认订单，付款" class="formbutton"  name="btnadd"/>
			
					<input type="button" value="确认订单，稍后再付款" class="formbutton" onclick="location.href='index.aspx';" />
			
					<a href="/team/buy.aspx?orderid=<%=ordermodel.Id %>" style="margin-left:1em;">返回修改订单</a>
                     

					</p>
                  <% if (userbll.GetUsermoney(ordermodel.User_id.ToString()) < ordermodel.Origin)
                       { %>
                        <br />
                       <p style=" color:Red;">友情提示：由于支付宝或网银通知消息可能会有延迟,如果您已经支付过该订单,请不要再修改订单或付款. 稍后更新订单状态! </p>
                    <%} %>
				</div>
                  <% }%>

            
				</div>
			</div>
		</div>
		
	</div>

    <div id="sidebar">

<uc3:blockcard ID="blockcard1" 
        Visible="false" runat="server"/>
</div>
</div>

<% }%>


    </form>
</div> <!-- bd end -->
</div> <!-- bdw end -->




    <uc1:CFooterControl ID="CFooterControl1" runat="server" />

    </form>
</body>
</html>
